#include <stdio.h>
#include <string.h>

#define MAX 64

int main(int argc, char *argv[])
{
	int n, s[MAX], d[MAX];
	int i, j, t, flg, lf, rf, mid;
	char buf[256], *ps;

	gets(buf);
	n = atoi(buf);
	gets(buf);
	for (ps = strtok(buf, " "), i=0; ps; ps = strtok(NULL, " "), i++) {
		s[i] = atoi(ps);
	}

	for (i=0; i<n-1; i++) {
		for (j=i+1; j<n; j++) {
			if (s[i] < s[j]) {
				t = s[i]; s[i] = s[j]; s[j] = t;
			}
		}
	}

	mid = (int)n / 2; lf= mid-1; rf = mid+1;
	d[mid] = s[0];
	flg = -1; // -1 is left; 1 is right
	for (i=1; i<n; i++) {
		if (flg == 1) {
			d[lf] = s[i];
			lf--;
		} else {
			d[rf] = s[i];
			rf++;
		}
		flg = flg * (-1);
	}

	for (i=0; i<n; i++) printf("%d ", d[i]);
	printf("\n");

	return 0;
}
